<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
    // NOTE: all cache times are in minutes.
    
   $host = $_SERVER['HTTP_HOST'];  
    switch($host) {
        case 'local.tangiakhang.com':            
            define('ENV_NAME','local');
            define('ERROR_LEVEL',E_ALL);
            define('BASEURL','http://local.tangiakhang.com/'); 
            define('DOMAIN', 'local.tangiakhang.com/'); 
	    define('WT_DOMAIN', 'local.tangiakhang.com/');
            define('PROFILER',TRUE);
            define('LOG_THRESHOLD',0);
            define('CACHE_TIME_1_DAY', 0);
            define('CACHE_TIME_1_WEEK', 0);
            define('CACHE_TIME_4_HOURS', 0);                    
            break;    
        case strstr($host,'tangiakhang.com'):                        
            define('ENV_NAME','dev');
            define('ERROR_LEVEL',E_ALL);
            define('BASEURL','http://tangiakhang.com/');
            define('DOMAIN', 'tangiakhang.com/');
            define('WT_DOMAIN', 'tangiakhang.com/');
            define('PROFILER',FALSE);
            define('LOG_THRESHOLD',0);    
            define('CACHE_TIME_1_DAY', 0);
            define('CACHE_TIME_1_WEEK', 0);
            define('CACHE_TIME_4_HOURS', 0);
            break;
        default:
            define('ENV_NAME','dev');
            define('ERROR_LEVEL',E_ALL);
            define('BASEURL','http://www.tangiakhang.com/');
            define('DOMAIN', 'www.tangiakhang.com/');
            define('WT_DOMAIN', 'tangiakhang.com');
            define('ADMIN_EMAIL', 'bobby@php-vn.com');            
            define('PROFILER',FALSE);
            define('LOG_THRESHOLD',0);
            define('CACHE_TIME_1_DAY', 60*24);
            define('CACHE_TIME_1_WEEK', 60*24*7);
            define('CACHE_TIME_4_HOURS', 60*4);            
            break;
    } 
    error_reporting(ERROR_LEVEL);
    if(ERROR_LEVEL === 0)
    {
        ini_set('display_errors','0');
    }
    else
    {
        ini_set('display_errors','1');
    }    
    require_once('db_settings.php'); 
    set_db_settings(ENV_NAME);    
    // global session id for webtrends revenue tracking
    //require_once('click_cookie.php');
    
   
?>
